home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 004 / _rpncalc / !RPNCalc / !Help < prev    next >
Text File  |  1994-11-13  |  36KB  |  951 lines

  1. ->!Help
  2.  
  3.                             RPN Scientific Calculator
  4.                             =========================
  5.  
  6. This disc contains a powerful Scientific Calculator using Reverse Polish
  7. Notation for RISC OS on the Archimedes.
  8.  
  9. The contents of this disc, are as follows;
  10.  
  11. !Boot         *Run by the Filer when it first displays the RPNCalc
  12.               directory.
  13. !Sprites      Passed to *IconSprites by the !Boot file.
  14. !Run          *Run by the Filer when a user double-clicks on the RPNCalc
  15.               directory.
  16. !RunImage     RPNCalc executable code.
  17. Templates     Window templates.
  18. Sprites       RPNCalc private sprite file.
  19. Messages      Text messages.
  20. !Help         Information about RPNCalc.
  21. Choices       User choices.
  22.  
  23. Memory Requirements
  24. ===================
  25.  
  26. Program Area  128K
  27.  
  28. Limitations
  29. ===========
  30.  
  31. RPNCalc only works under RISC OS 3.10 or greater.
  32.  
  33. 1.0 Getting Started
  34. ===================
  35.  
  36. To copy this application onto another disc, or install it on the hard disc,
  37. open a directory display on the destination disc within the RISC OS Desktop
  38. and drag the !RPNCalc application icon to the destination directory in the
  39. normal manner.
  40.  
  41. The calculator may be installed on the icon bar by double clicking on the
  42. !RPNCalc application icon.
  43.  
  44. Double-clicking on the !RPNCalc icon on the icon bar then causes the main
  45. calculator window to be displayed. This implements the numerical keyboard,
  46. display and simple arithmetic functions of the calculator.
  47.  
  48. Further functions may be accessed through the pop-up menu associated with
  49. the calculator window.
  50.  
  51. The calculator window may be removed from the screen area in the normal way
  52. by clicking on the close icon. The icon remains on the icon bar and the
  53. calculator's state and registers are maintained.
  54.  
  55. Choice of the 'quit' item on the icon bar menu causes !RPNCalc to close all
  56. its windows and quit.
  57.  
  58. RPNCalc is fully compatible with the !Help application.
  59.  
  60. 2.0 Introduction
  61. ================
  62.  
  63. This calculator uses a unique operating logic based on that pioneered in the
  64. handheld calculator market by Clive Sinclair and for many years the basis of
  65. operation for the Hewlett-Packard range of calculators beloved by scientists
  66. and engineers.
  67.  
  68. This differs from the logic used in most other calculators and centres
  69. around use of the ENTER button. This makes nested and complicated
  70. calculations easier and faster to work out.
  71.  
  72. For example consider arithmetic functions. To perform arithmetic, key in the
  73. first number, click on ENTER to separate the first number from the second,
  74. then key in the second number and click on '+', '-', '*', or '/'. The result
  75. then appears immediately on the display.
  76.  
  77. Try the following examples for yourself. 
  78.  
  79. To Compute:            Buttons pressed          Display
  80.  
  81. 9 - 6 = 3            '9' 'ENTER' '6' '-'          3.00
  82. 9 x 6 = 54           '9' 'ENTER' '6' '*'         54.00
  83. 9 / 6 = 1.5          '9' 'ENTER' '6' '/'          1.50
  84.  
  85. 3.0 Basic Operation
  86. ===================
  87.  
  88. The calculator supports the entry of numbers and the operation of simple
  89. arithmetic functions through the clicking of the Select button on icons
  90. displayed within the main calculator window.
  91.  
  92.    The icons 0 to 9 and . allow numbers to be entered into the display.
  93.  
  94.    The icons + - / and * cause the corresponding arithmetical operations to be
  95.    actioned.
  96.  
  97.    The ENTER icon terminates entry of a number.
  98.  
  99.    The CLR icon allows numbers to be deleted from the display. During number
  100.    entry clicking on the CLR icon causes the last digit entered to be deleted.
  101.    After number entry has been terminated clicking on CLR causes the entered
  102.    number to be cleared.
  103.  
  104.    The CHS icon allows the sign of the displayed number to be changed.
  105.  
  106.    The EXP icon allows exponents to be entered. First enter the mantissa, then
  107.    click on EXP and enter the exponent. For a negative exponent click on CHS
  108.    after entering the exponent.
  109.  
  110.    The STO and RCL icons allow operation with the 10 internal storage
  111.    registers.
  112.  
  113.    The x▓ icon calculates the square of the number in the display.
  114.  
  115.    The 1/x icon calculates the reciprocal of the number in the display.
  116.  
  117. Further functions may be operated by clicking of the Adjust button on the
  118. icons in the main calculator window.
  119.  
  120.    The + icon accumulates statistical information within the storage registers
  121.    R2 through R7.
  122.  
  123.    The - icon allows data to be removed from the accumulated statistical
  124.    information.
  125.  
  126.    The ENTER icon rolls the memory stack down.
  127.  
  128.    The CLR icon causes the entire number in the display to be cleared.
  129.  
  130.    The x▓ icon calculates the square root of the number in the display.
  131.  
  132. The Archimedes keyboard can also be used to control the calculator when the
  133. calculator has the input focus:
  134.  
  135.    The numeric keys 0 to 9 and . allow numbers to be entered into the
  136.    display.
  137.  
  138.    The keys + - / and * cause the corresponding arithmetical operations
  139.    to be actioned.
  140.  
  141.    Enter and Return have the same action as the 'ENTER' key on the
  142.    calculator.
  143.  
  144.    The up and down arrow keys cause the register stack to roll up and down
  145.    respectively.
  146.  
  147. The pop-up menu provides access to more complex functions.
  148.  
  149.    The Function menu option provides access to simple one and two number
  150.    arithmetic functions.
  151.  
  152.    The Effect menu option allows control of the display and trigonometric
  153.    modes.
  154.  
  155.    The Utilities menu option provides access to transcendental, statistical
  156.    and conversion functions as well as a range of constants.
  157.  
  158. 3.1 Icon Bar Menu
  159. =================
  160.  
  161. Pressing Menu over the RPNCalc icon on the icon bar calls up the RPNCalc
  162. icon bar menu in the normal manner, this contains the following three items.
  163.  
  164.    Info details information about the program
  165.  
  166.    Choices allows the user to set choices that may be preserved from one
  167.    use of RPNCalc to the next. The choices available are described in more
  168.    detail in the following section. 
  169.  
  170.    Quit causes the calculator windows to be closed and the dynamic memory
  171.    to be freed. 
  172.  
  173. 3.2 User Choices
  174. ================
  175.  
  176. The Choices dialogue box is displayed by clicking on the Choices item in the
  177. icon bar menu and provides the following options.
  178.  
  179.   Register Display:-
  180.  
  181.     The Memory Stack Option causes the four memory stack registers to be
  182.     displayed in a window. This allows the operation of the stack to be
  183.     observed during use of the calculator.
  184.  
  185.     The Storage Option causes the ten internal storage registers to be
  186.     displayed in a window. This allows operations between the calculator
  187.     display and storage registers to be achieved by use of the Wimp's drag
  188.     and drop features.
  189.  
  190.   The Startup Option causes the calculator and chosen register windows to be
  191.   displayed immediately when RPNCalc is installed on the icon bar.
  192.  
  193.   Save saves the choices in the Choices file to be reused in subsequent
  194.   sessions and implements the choices immediately.
  195.  
  196.   Cancel reset the choices in use before the dialogue box was displayed.
  197.  
  198.   Set implements the choices for the current session.
  199.  
  200. 3.3 Import and Export of Values
  201. ===============================
  202.  
  203. Results from the display and the displayed storage registers can be
  204. exchanged with other application windows using the drag and drop features of
  205. the WIMP.
  206.  
  207. 3.3.1 Import
  208.  
  209. A value can be entered into the calculator by dropping the sprite for a
  210. selected save of numerical text from another application into the calculator
  211. display or a displayed storage register.
  212.  
  213. If the sprite is dropped over the display then the dragged text will be
  214. entered into the calculator as though it has been typed in at the keyboard.
  215.  
  216. If the sprite is dropped over a storage register then the value is entered
  217. into the register as though it had been entered into the display and then
  218. stored in the register.
  219.  
  220. 3.3.2 Export
  221.  
  222. The value from the display may be transferred to another application by
  223. pressing select over the display, dragging the resulting sprite to the
  224. intended window and releasing select.
  225.  
  226. The value from a storage register may also be transferred by pressing Select
  227. over the required storage register in the storage register window, dragging
  228. the resulting sprite to the intended window and releasing Select.
  229.  
  230. RPNCalc then attempts to place the text icon in the intended window and
  231. insert the text string corresponding to the dragged value.
  232.  
  233. 3.3.3 Calculation
  234.  
  235. The calculator can also accept input from a text file. This may include both
  236. values and functions.
  237.  
  238. These will be entered into the calculator as though entered through the
  239. calculator window or computer keyboard.
  240.  
  241. A carriage return actions the ENTER functions and the simple arithmetic
  242. functions, '-', '+', 'x', and '/' are supported.
  243.  
  244. For example, if an ASCII text file is prepared with the contents,
  245.  
  246.    1.25
  247.    2.5
  248.    +
  249.  
  250. and the file is dragged to the calculator window then both numbers will be
  251. entered into the calculator and the '+' operation executed to give result,
  252.  
  253.    3.75
  254.  
  255. 4.0 Numeric Functions
  256. =====================
  257.  
  258. This section discusses the numeric functions of RPNCalc available from the
  259. pop-up menu. Several of these functions are also available using the
  260. calculator icons or the computer's keyboard.
  261.  
  262. 4.1 Constants
  263. -------------
  264.  
  265. The choice of UtilitiesëConstants causes the Physical Constants dialogue box
  266. to be displayed, this contains a vertical list of common physical constants.
  267. Choice of an item from the list causes the chosen constant to be entered
  268. into the calculator.
  269.  
  270. 4.2 Number Alteration Functions
  271. -------------------------------
  272.  
  273. UtilitiesëAlterationëInteger replaces the number in the display with the
  274. nearest integer of lesser or equal magnitude.
  275.  
  276. UtilitiesëAlterationëFraction replaces the number in the display with its
  277. fractional part (the difference between the number and its integer part).
  278.  
  279. UtilitiesëAlterationëRound rounds all 18 internally held digits of the
  280. mantissa of the displayed value to the number of digits specified by the
  281. current display format.
  282.  
  283. UtilitiesëAlterationëAbsolute yields the absolute value of the number in the
  284. display.
  285.  
  286. 4.3.0 One-Number Functions
  287. --------------------------
  288.  
  289. 4.3.1 General Functions
  290.  
  291. Choice of the option Functionsë1/x calculates the reciprocal of the number
  292. in the display.
  293.  
  294. Choice of the option Functionsëx! calculates the factorial of the displayed
  295. value, where x is an integer between 0 and 69.
  296.  
  297. x! can also be used to calculate the Gamma function, in this case x is not
  298. restricted to non-negative numbers. x! actually calculates Gamma( x+1 ).
  299.  
  300. Choice of the option Functionsësqrt x calculates the positive square root of
  301. the number in the display.
  302.  
  303. Choice of the option Functionsëx▓ calculates the square of the number in the
  304. display.
  305.  
  306. 4.3.2 Trigonometric Operations
  307.  
  308. 4.3.2.1 Trigonometric Modes
  309.  
  310. The trigonometric functions operate in trigonometric modes selected by the
  311. user. The trigonometric mode tells the calculator what unit of measure
  312. (degrees,  radians or grads) to assign a number for a trigonometric
  313. function.
  314.  
  315. Choice of the EffectëMode pop-up menu option causes the trigonometric mode
  316. dialogue box to be displayed allowing the mode to be applied to the
  317. calculator.
  318.  
  319. Degrees sets Degrees mode. No annunciator appears in the display. This is
  320. the mode on initialisation.
  321.  
  322. Radians sets Radians mode. The RAD annunciator appears in the display.
  323.  
  324. Grads sets Grads mode. The GRAD annunciator appears in the display.
  325.  
  326. 4.3.2.2 Trigonometric Functions 
  327.  
  328.    Option Chosen                             Function
  329.  
  330.    UtilitiesëFunctionsëCircularësinh x       sine of x
  331.    UtilitiesëFunctionsëCircularëasinh x      arc sine of x
  332.    UtilitiesëFunctionsëCircularëcosh x       cosine of x
  333.    UtilitiesëFunctionsëCircularëacosh x      arc cosine of x
  334.    UtilitiesëFunctionsëCircularëtanh x       tangent of x
  335.    UtilitiesëFunctionsëCircularëatanh x      arc tangent of x
  336.  
  337. Before executing a trigonometric function be sure that the calculator is set
  338. to the desired trigonometric mode. 
  339.  
  340. 4.3.3 Time and Angle Conversions
  341.  
  342. Numbers representing time (hours) or angles (degrees) can be converted by
  343. the calculator between a decimal-fraction and a minutes-second format.
  344.  
  345. Choice of the UtilitiesëConversionsëH.MS option converts the number in the
  346. display from a decimal format to a minutes-second format.
  347.  
  348. Choice of the UtilitiesëConversionsëHours option converts the number in the
  349. display from a minutes-second format to a decimal format.
  350.  
  351. 4.3.4 Degrees and Radians Conversions
  352.  
  353. Number representing angles can be converted between degrees and radians. The
  354. angles must be expressed in decimal numbers and not in minutes-second
  355. format.
  356.  
  357. Choice of the UtilitiesëConversionsëDegrees option converts the number in
  358. the display to degrees.
  359.  
  360. Choice of the UtilitiesëConversionsëRadians option converts the number in
  361. the display to radians.
  362.  
  363. 4.3.5 Logarithmic Functions
  364.  
  365. Choice of the 'UtilitiesëFunctionsëLogarithmicëLN x' option calculates the
  366. natural logarithm of the number in the display; that is, the logarithm to
  367. the base e.
  368.  
  369. Choice of the 'UtilitiesëFunctionsëLogarithmicëe^x' option calculates the
  370. natural antilogarithm of the number in the display; that is, raises e to the
  371. power of that number.
  372.  
  373. Choice of the 'UtilitiesëFunctionsëLogarithmicëLOG x' option calculates the
  374. common logarithm of the number in the display; that is, the logarithm to the
  375. base 10.
  376.  
  377. Choice of the 'UtilitiesëFunctionsëLogarithmicë10^x' option calculates the
  378. common antilogarithm of the number in the display; that is, raises 10 to the
  379. power of that number.
  380.  
  381. 4.3.6 Hyperbolic Functions   
  382.  
  383.    Option Chosen                               Function
  384.  
  385.    UtilitiesëFunctionsëHyperbolicësinh x       hyperbolic sine of x
  386.    UtilitiesëFunctionsëHyperbolicëasinh x      inverse hyperbolic sine of x
  387.    UtilitiesëFunctionsëHyperbolicëcosh x       hyperbolic cosine of x
  388.    UtilitiesëFunctionsëHyperbolicëacosh x      inverse hyperbolic cosine of x
  389.    UtilitiesëFunctionsëHyperbolicëtanh x       hyperbolic tangent of x
  390.    UtilitiesëFunctionsëHyperbolicëatanh x      inverse hyperbolic tangent of x
  391.  
  392. 4.4.0 Two-Number Functions
  393. --------------------------
  394.  
  395. The calculator performs two-number functions using two values entered
  396. sequentially into the display. If these numbers are keyed in then they must
  397. be separated by ENTER or any other function that terminates digit entry.
  398.  
  399. For a two-number function, the first value entered is considered the y-value
  400. because it is placed into the Y-register for memory storage. The second
  401. value entered is considered the x-value because it remains in the display,
  402. which is the X-register.
  403.  
  404. The arithmetic operators, +, -, * and /, are the four basic two-number
  405. functions. Others are given below. 
  406.  
  407. 4.4.1 The Power Function
  408.  
  409. Choice of the Functionsëy^x option calculates the value of y raised to the x
  410. power. The base number, y, is keyed in before the exponent, x.
  411.  
  412. 4.4.2 Percentages
  413.  
  414. The percentage functions preserve the value of the original base number
  415. along with the result of the percentage calculation. This allows subsequent
  416. calculations to be carried out using the base number and the result without
  417. re-entering the base number.
  418.  
  419. 4.4.2.1 Percent
  420.  
  421. Choice of the 'Functionsëx% of y' option calculates the specified
  422. percentage, x, of a base number, y.
  423.  
  424. 4.4.2.2 Percent Difference
  425.  
  426. Choice of the 'Functionsë(x-y)% of y' option calculates the percent
  427. difference between two numbers. The result expresses the relative increase
  428. (a positive result) or decrease (a negative result) of x compared to y.
  429.  
  430. 4.4.3 Polar and Rectangular Coordinate Conversions
  431.  
  432. These functions are provided for conversions between polar and rectangular
  433. coordinates.
  434.  
  435. The angle 'theta' is assumed to be in the units set by the current
  436. trigonometric mode, whether degrees (in decimal format), radians or grads.
  437.  
  438. 4.4.3.1 Polar Conversion
  439.  
  440. Choice of the UtilitiesëConversionsëPolar option converts a set of
  441. rectangular coordinates (x, y) to polar coordinates (magnitude r, angle
  442. theta). The y-value must be entered first, the x-value second. Upon
  443. execution r will appear in the display. Choose the 'Functionsëx<>y' option
  444. (X exchange Y) to bring theta out of the Y-register and into the display.
  445. Theta will be returned as a value between -180░ and 180░, between -PI and PI
  446. radians, or between -200 and 200 grads. 
  447.  
  448. 4.4.3.2 Rectangular Conversion
  449.  
  450. Choice of the UtilitiesëConversionsëRectangular option converts a set of
  451. polar coordinates (r, theta) to rectangular coordinates (x, y). Theta must
  452. be entered first, then r. Upon execution x will appear in the display.
  453. Choose the 'Functionsëx<>y' option to display y.
  454.  
  455. 5.0 The Automatic Memory Stack and Data Storage
  456. ===============================================
  457.  
  458. 5.1 The Automatic Memory Stack and Stack Manipulation
  459. -----------------------------------------------------
  460.  
  461. The calculator's operating logic is based on a mathematical logic known as
  462. 'Polish Notation'. Conventional algebraic notation places the algebraic
  463. operators between the relevant numbers or variables when evaluating
  464. algebraic expressions. 'Polish Notation' specifies the operators before the
  465. variables.
  466.  
  467. The calculator uses the convention, applied by Hewlett Packard for
  468. efficiency of use, of specifying the operators after the variables. Hence
  469. the term 'Reverse Polish Notation' (RPN).
  470.  
  471. RPNCalc uses RPN to solve complicated calculations in a straightforward
  472. manner, without parentheses or punctuation. It does so by automatically
  473. retaining and returning intermediate results. This system is implemented
  474. through the automatic memory stack and the ENTER function, minimising total
  475. operations.
  476.  
  477. The number that appears in the display is the X-register. Any number that is
  478. keyed in or results from the execution of a numeric function is placed into
  479. the display (X-register). This action will cause numbers already in the
  480. stack to lift, remain in the same register, or drop, depending upon both the
  481. immediately preceding and the current operation. Numbers in the stack are
  482. stored on a last-in, first-out basis. For convenience the registers are
  483. named X, Y, Z and T.
  484.  
  485. The number in the T-register remains there when the stack drops, allowing
  486. this number to be used repetitively as an arithmetic constant.
  487.  
  488. 5.1.1 Stack Display
  489.  
  490. Selection of the Memory Stack Option in the Choices dialogue box allows the
  491. four stack registers to be displayed in a window.
  492.  
  493. 5.1.2 Stack Manipulation Functions
  494.  
  495. Clicking on ENTER separates two numbers keyed in one after the other. It
  496. does so by lifting the stack and copying the number in the display
  497. (X-register) into the Y-register. The next number entered then writes over
  498. the value in the X-register; there is no stack lift.
  499.  
  500. The up and down arrow keys on the computer keyboard roll the contents of the
  501. stack registers up and down one register (one value moves between the X and
  502. the T-register). No values are lost. Clicking of the ADJUST button on the
  503. ENTER icon also rolls the register stack down.
  504.  
  505. Choice of the Functionsëx<>y pop-up menu option exchanges the numbers in the
  506. X and Y-registers.
  507.  
  508. 5.1.3 The LAST X Register
  509.  
  510. The LAST X register is a separate memory register which preserves the value
  511. that was last in the display before execution of a numeric operation. Choice
  512. of the 'UtilitiesëLAST X' pop-up menu option places a copy of the contents
  513. of the LAST X register into the display.
  514.  
  515. The LAST X feature avoids the re-entry of numbers needed again. It can also
  516. assist in error recovery, such as executing the wrong function or keying in
  517. the wrong number.
  518.  
  519. 5.1.4 Calculator Functions and the Stack
  520.  
  521. When two numbers are entered, one after the other, ENTER is operated between
  522. entries. However ENTER does not need to be used when a number is immediately
  523. followed by a function. This is because most functions enable lifting of the
  524. stack, such that the stack will lift automatically when the next number is
  525. keyed or recalled into the display, and terminates digit entry, so that the
  526. next number starts a new entry.
  527.  
  528. There are four functions - ENTER, CLx, SUM+ and SUM- - that disable stack
  529. lift. Following execution of one of these functions a new number will write
  530. over the currently displayed number instead of causing the stack to lift.
  531.  
  532. In most cases the effects are natural.
  533.  
  534. 5.1.5 Order of Entry and the ENTER key
  535.  
  536. An important aspect of two-number functions is the positioning of the
  537. numbers in the stack. To execute an arithmetic function, the numbers should
  538. be positioned in the stack in the same way that they are vertically
  539. positioned on paper. For example:
  540.  
  541.         98        98        98       98
  542.        -15       +15       x15      /15
  543.        ---       ---       ---      ---
  544.  
  545. The first (or top) number would be in the Y-register, while the second (or
  546. bottom) number would be in the X-register. When the mathematical operation
  547. is performed, the stack drops, leaving the result in the X-register.
  548.  
  549. 5.1.6 Nested Calculations
  550.  
  551. The automatic stack lift and stack drop make it possible to do nested
  552. calculations without using parentheses or storing intermediate results. A
  553. nested calculation is solved simply as a series of one and two-number
  554. operations.
  555.  
  556. Almost every nested calculation can be done using just the four stack
  557. registers. It is usually wisest to begin the calculation at the innermost
  558. number or pair of parentheses and work outwards (as for a manual
  559. calculation). Otherwise an intermediate result may need to be placed in a
  560. storage register. For example, consider the calculation of
  561.  
  562.                           3 ( 4 + 5 ( 6 + 7 ) ) :
  563.  
  564.       Entries           Display
  565.  
  566.       6 ENTER 7 +       13.00    Intermediate result of ( 6 + 7 ).
  567.       5 x               65.00    Intermediate result of 5 ( 6 + 7 ).
  568.       4 +               69.00    Intermediate result of ( 4 + 5 ( 6 + 7 ) ).
  569.       3 x              207.00    Final result: 3 ( 4 + 5 ( 6 + 7 ) ).
  570.  
  571. The stack automatically drops after each two-number calculation, and then
  572. lifts when a new number is keyed in.
  573.  
  574. 5.1.7 Arithmetic Calculations with Constants
  575.  
  576. There are three ways (without using a storage register) to manipulate the
  577. memory stack to perform repeated calculations with a constant:
  578.  
  579.    1.  Use the LAST X register
  580.    2.  Load the stack with a constant and operate upon different numbers.
  581.    3.  Load the stack with a constant and operate upon an accumulating
  582.        numbers.
  583.  
  584. 5.1.7.1 LAST X
  585.  
  586. Enter the constant second so that it will be saved in the LAST X register.
  587. Choice of the 'UtilitiesëLAST X' pop-up menu option will place a copy of the
  588. contents of the LAST X register into the X-register (the display). This can
  589. be done repeatedly.
  590.  
  591. 5.1.7.2 Loading the Stack with a Constant
  592.  
  593. Because the number in the T-register is replicated when the stack drops,
  594. this number can be used as a constant in arithmetic operations.
  595.  
  596. Fill the stack with a constant by entering it into the display and clicking
  597. on ENTER three times. Enter the initial argument and perform the arithmetic
  598. operation. The stack will drop, a copy of the constant will "fall" into the
  599. Y-register, and a new copy of the constant will be generated in the
  600. T-register.
  601.  
  602. If the variables change be sure to clear the display before entering the new
  603. variable. This disables the stack so that the arithmetic result will be
  604. written over and only the constant will occupy the rest of the stack.
  605.  
  606. If the operation is to be performed on a cumulative number, then do not
  607. clear the display - simply repeat the arithmetic operation.
  608.  
  609. 5.2 Storage Register Operations
  610. -------------------------------
  611.  
  612. When numbers are stored or recalled, they are copied between the display
  613. (X-register) and the data storage registers. RPNCalc has 10 directly
  614. accessible storage registers: R0 through R9. Six registers, R2 to R7, are
  615. also used for statistics calculations.
  616.  
  617. 5.2.1 Storage Register Display
  618.  
  619. Setting of the Storage Option in the Choices dialogue box allows the ten
  620. storage registers to be displayed in a window.
  621.  
  622. This allows storage register operations to be performed using the drag and
  623. drop features of the WIMP under RISC OS as well as simplifying the normal
  624. operations.
  625.  
  626. On the left of each storage register is a radio button, this can be used to
  627. select a storage register. Only one storage register may be selected at any
  628. one time. Pressing Adjust over a selected radio button will deselect it such
  629. that no storage registers are selected. (This is a slight deviation from the
  630. RISC OS 3 Style Guide). 
  631.  
  632. 5.2.2 Storing and Recalling Numbers
  633.  
  634. 5.2.2.1 Storing Numbers
  635.  
  636. Clicking on the STO icon followed by a storage register address (0 through
  637. 9) copies the number from the display into the specified data storage
  638. register replacing the existing contents of that register. During this
  639. operation a STO annunciator appears in the display showing that a storage
  640. register address is required.
  641.  
  642. If the storage register window is open and one of the storage registers has
  643. been selected then clicking on the STO icon will copy the number from the
  644. display into the selected data storage register without entry of the storage
  645. register address. 
  646.  
  647. The number from the display may also be transferred to a storage register by 
  648. pressing Select over the display, dragging the resulting sprite to the
  649. required storage register in the storage register window and releasing
  650. Select.
  651.  
  652. 5.2.2.2 Recalling Numbers
  653.  
  654. Clicking on the RCL icon followed by a storage register address (0 through
  655. 9) copies the number from the specified data storage register into the
  656. display. The contents of the storage register remain unaltered. During this
  657. operation a RCL annunciator appears in the display showing that a storage
  658. register address is required.
  659.  
  660. If the storage register window is open and one of the storage registers has
  661. been selected then clicking on the RCL icon will copy the number from the
  662. selected data storage register into the display without entry of the storage
  663. register address. 
  664.  
  665. The number from a storage register may also be transferred to the display by 
  666. pressing Select over the required storage register in the storage register
  667. window, dragging the resulting sprite to the display and releasing Select.
  668.  
  669. 5.2.2.3 Exchanging Numbers
  670.  
  671. If the storage register window is open then the number from a storage
  672. register may be exchanged with the display by pressing Select over the
  673. required storage register in the storage register window, dragging the
  674. resulting sprite to the display and releasing Select, while the SHIFT key is
  675. pressed.
  676.  
  677. 5.2.3 Clearing Data Storage Registers
  678.  
  679. This function has not been implemented.
  680.  
  681. 5.2.4 Storage and Recall Arithmetic
  682.  
  683. 5.2.4.1 Storage Arithmetic
  684.  
  685. It is possible to perform arithmetic on a number in a storage register and
  686. store the result in the same register without use of the RCL operation.
  687.  
  688. With the second operand in the display click on the STO icon followed by one
  689. of, +, -, x, or /. The STOn annunciator will appear in the display, where n
  690. is one of, +, -, x, or /. Finally key in the register address (0 to 9) by
  691. selecting the corresponding icon.
  692.  
  693. The new number in the register is determined as follows.
  694.  
  695.                                  +
  696.   new contents  =  old contents  -  number in
  697.    of register      of register  x  display
  698.                                  /
  699.  
  700. 5.2.4.2 Recall Arithmetic
  701.  
  702. Recall arithmetic allows arithmetic with the displayed value and a stored
  703. value without lifting the stack, that is, without losing any values from the
  704. Y, Z and T-registers.
  705.  
  706. With the second operand in the display click on the RCL icon followed by one
  707. of, +, -, x, or /. The RCLn annuncator will appear in the display, where n
  708. is one of, +, -, x, or /. Finally key in the register address (0 to 9) by
  709. selecting the corresponding icon.
  710.  
  711. The new number in the register is determined as follows.
  712.  
  713.                                +
  714.   new display  =  old display  -  contents of
  715.                                x   register
  716.                                /
  717.  
  718. 5.2.4.3 Overflow and Underflow
  719.  
  720. On underflow the calculate reports a 'Divide by zero' error and the register
  721. is unchanged.
  722.  
  723. 6.0 Statistical Functions
  724. =========================
  725.  
  726. 6.1 Probability Calculations
  727. ----------------------------
  728.  
  729. The input for permutation and combination calculations is restricted to
  730. nonnegative integers. Enter the y-value before the x-value. These functions,
  731. like the arithmetic operators, cause the stack to drop as the result is
  732. placed in the X-register.
  733.  
  734. 6.1.1 Permutations
  735.  
  736. Choice of the UtilitiesëFunctionsëStatisticalëPxy pop-up menu option
  737. calculates the number of different arrangements of y different items taken
  738. in quantities of x items at a time. No item occurs more than once in an
  739. arrangement, and different order of the same x items in an arrangement are
  740. counted separately. The formula is
  741.  
  742.                       y!
  743.            Py,x = --------  
  744.                   (y - x)!
  745.  
  746. 6.1.2 Combinations
  747.  
  748. Choice of the UtilitiesëFunctionsëStatisticalëCxy pop-up menu option
  749. calculates the number of possible sets of y different items taken in
  750. quantities of x items at a time. No item occurs more than once in a set, and
  751. different order of the same x items in a set are not counted separately. The
  752. formula is
  753.  
  754.                       y!
  755.            Cy,x = ----------  
  756.                   x!(y - x)!
  757.  
  758. 6.2 Random Number Generator
  759. ---------------------------
  760.  
  761. Choice of the UtilitiesëFunctionsëStatisticalëRAN# pop-up menu option will
  762. generate a random number in the range 0 <= r < 1.
  763.  
  764. 6.3 Accumulating Statistics
  765. ---------------------------
  766.  
  767. RPNCalc performs one and two-variable statistical calculations through the
  768. use of the SUM+ and SUM- functions.
  769.  
  770. The SUM+ function is executed by clicking on the + icon with the Adjust
  771. button. Similarly the SUM- function is executed by clicking on the - icon
  772. with the Adjust button.
  773.  
  774. The data is first entered into the Y and X registers. Then the SUM+ function
  775. automatically calculates and stores statistics of the data in storage
  776. registers R2 through R7. These registers are therefore referred to as the
  777. statistics registers.
  778.  
  779. Therefore before beginning to accumulate statistics for a new set of data
  780. ensure that the statistics registers and stack are clear.
  781.  
  782. In one-variable statistical calculations, enter each data point (x-value) by
  783. keying in x and executing SUM+.
  784.  
  785. In two-variable statistical calculations, enter each data pair (x and
  786. y-values) by keying by first keying in the y-value, clicking on ENTER, then
  787. keying in the x-value, and finally executing SUM+.
  788.  
  789. The current number of accumulated data points, n, will be displayed. The
  790. x-value is saved in the LAST X register and y remains in the Y-register.
  791. SUM+ disables stack lift, so the stack will not lift when the next number is
  792. keyed in.
  793.  
  794. The statistics of the data are compiled as follows:
  795.  
  796.    Register               Contents
  797.  
  798.    R2          n       Number of data points accumulated.
  799.    R3          SUMx    Summation of x-values.
  800.    R4          SUMx▓   Summation of squares of x-values.
  801.    R5          SUMy    Summation of y-values.
  802.    R6          SUMy▓   Summation of squares of y-values.
  803.    R7          SUMxy   Summation of products of x and y-values.
  804.  
  805. Any of the accumulated statistics can be recalled to the display by clicking
  806. on RCL and the number of the data storage register containing the desired
  807. statistic.
  808.  
  809. 6.3.1 Correcting Accumulated Statistics
  810.  
  811. If data is entered incorrectly, the accumulated statistics can be easily
  812. corrected. Key the incorrect data pair into the Y and X-registers and
  813. execute SUM-, then key in the correct value for x and y and execute SUM+.
  814.  
  815. Alternatively, it the incorrect data point or pair is the most recent one
  816. entered and SUM+ has been pressed, choosing the 'UtilitiesëLAST X' pop-up
  817. menu option and executing SUM- will remove the incorrect data.
  818.  
  819. 6.3.1 Mean
  820.  
  821. Choice of the UtilitiesëFunctionsëStatisticalëmean pop-up menu option
  822. calculates the arithmetic mean of the x and y values using the statistics
  823. accumulated in the relevant registers, the contents of the stack lift and
  824. the mean of x is copied into the X-register as the mean of y is copied into
  825. the Y-register.
  826.  
  827. Choice of the 'Functionsëx<>y' pop-up menu option can be used to view the
  828. mean of y if the memory stack registers are not displayed.
  829.  
  830. 6.3.2 Standard Deviation
  831.  
  832. Choice of the UtilitiesëFunctionsëStatisticalësd pop-up menu option
  833. calculates the standard deviation of the accumulated statistics data.
  834.  
  835. This function gives an estimate of the population standard deviation from
  836. the sample data, and is therefore termed the sample standard deviation. On
  837. execution the contents of the stack are lifted and the Sx is placed into the
  838. X-register as the Sy is placed into the Y-register.
  839.  
  840. Choice of the 'Functionsëx<>y' pop-up menu option can be used to view Sy if
  841. the memory stack registers are not displayed.
  842.  
  843. 6.3.3 Linear Regression
  844.  
  845. This function has not been implemented.
  846.  
  847. 6.3.4 Linear Estimation and Correlation Coefficient
  848.  
  849. This function has not been implemented.
  850.  
  851. 6.3.5 Other Applications
  852.  
  853. 6.3.5.1 Vector Arithmetic
  854.  
  855. The statistical accumulation functions can be used to perform vector
  856. addition and subtraction. Polar coordinates must be converted to rectangular
  857. coordinates upon entry. The results are available in R3 (Sum of x) and R5
  858. (Sum of y) and may be converted back to polar coordinates, if necessary.
  859.  
  860. For the second vector entered, the final function will be either SUM+ or
  861. SUM-, depending on whether the two vectors should be added or subtracted. 
  862.  
  863. 7.0 The Display
  864. ===============
  865.  
  866. The calculator has three display formats - fixed decimal, scientific, and
  867. engineering - that may be specified using the Display Format dialogue box
  868. accessible from the EffectsëDisplay pop-up menu option.
  869.  
  870. The current display format takes affect when digit entry is terminated;
  871. until then, all digits keyed in (up to 16) are displayed.
  872.  
  873. 7.1 Fixed Decimal Display
  874.  
  875. Fixed decimal format displays a figure with the number of decimal places
  876. specified (up to 10, depending on the size of the integer portion).
  877. Exponents will be displayed if the number is too small or too large for the
  878. display.
  879.  
  880. 7.2 Scientific Notation Display
  881.  
  882. Scientific format displays a figure in scientific notation with the number
  883. of decimal places specified (up to 10). In this mode exponents are
  884. displayed.
  885.  
  886. 7.3 Engineering Notation Display
  887.  
  888. Engineering format displays numbers in an engineering notation format in a
  889. manner similar to scientific, except that all exponents are shown in
  890. multiples of three.
  891.  
  892. 7.4 Mantissa
  893.  
  894. Regardless of the display format the calculator always internally holds each
  895. number as a 18 bit mantissa and a three bit exponent.
  896.  
  897. 8.0 Limits
  898. ==========
  899.  
  900. The calculator performs all internal mathematical calculations using double
  901. precision floating point numbers with limits as defined in the float.h
  902. header of ANSI C Release 4.
  903.  
  904. 9.0 Known Bugs
  905. ==============
  906.  
  907. Engineering mode display is the same as scientific mode.
  908.  
  909. On the RiscPC the drop and drag functions appear to effect the anti-aliased
  910. fonts used by the WIMP. WIMP test appears to be changes back to the system
  911. font. The screen needs to be refreshed in order to recover the normal font.
  912.  
  913. Detection of overflow is not good. Overflow can sometimes crash RPNCalc.
  914.  
  915. =============================================================================
  916.  
  917. Release 1.00 November 1994
  918.  
  919. (c) Copyright Peter Tuson 1994
  920.  
  921. This product is distributed as public domain. It be reproduced in
  922. whole or part by any means without written permission of the author.
  923.  
  924. While every care is taken, the author cannot be held responsible for
  925. any errors in this product, or for the loss of any data or
  926. consequential effects from the use of this package.
  927.  
  928. RISC OS, RiscPC and Archimedes are trademarks of Acorn Computer Ltd.
  929.  
  930. The source for constants and neumeric formulas was obtained from:
  931.  
  932. Handbook of Mathematical Functions
  933. Edited by Abramowitz and Stegun
  934. published by Dover, SBN 0-486-61272-4
  935.  
  936. ======
  937.  
  938. If you find this program useful or interesting a donation of ú10 sterling,
  939. sent to the address below, would be much appreciated.
  940.  
  941. If you have any comments, suggestions, more bug reports or complaints,
  942. please write to the following address. This does not constitute a commitment
  943. to correct reported bugs.
  944.  
  945. Dr. P.R.Tuson
  946. 70, Connaught Road
  947. Fleet
  948. Hants.
  949. GU13 9QY
  950. United Kingdom.
  951.